#if !defined(BOOST_PROGRAM_OPTIONS_HELPER_H)
#define BOOST_PROGRAM_OPTIONS_HELPER_H

#include <string>
#include <iostream>
#include <sstream>
#include <fstream>
#include <boost/any.hpp>
#include <boost/program_options.hpp>

namespace boost_program_options_helper
{
	void print_usage(std::ostream& os, const std::string& exe_name, const std::string& exe_param_line,
					boost::program_options::options_description& options, std::string exe_description,
					unsigned line_len);
	void print_version(std::ostream& os, const std::string& exe_name, const std::string& version,
					unsigned line_len = 80);
	void check_required_options(const boost::program_options::variables_map& vm,
								const boost::program_options::options_description& desc);
	
	void parse_indices(const std::string& search_str, std::vector<unsigned>& indices);
	
	struct t_option_level {
	public:
		unsigned n;
		t_option_level():n(0){}
		t_option_level& inc(){++n; return *this;}
	};
	
	inline t_option_level* option_level(unsigned* u)
	{return reinterpret_cast<t_option_level*>(u);}


}

	// allow multiple bool options?
	void validate(boost::any& v, const std::vector<std::string>& values,
					boost_program_options_helper::t_option_level* target_type, int);
	
	
	// validate unsigned
	void validate(boost::any& v, 
				  const std::vector<std::string>& values,
				  unsigned* target_type, int);

#endif
